package service;

import dao.*;

public class UsersManager {
	private UsersDAO usersDAO;

	public UsersDAO getUsersDAO() {
		return usersDAO;
	}

	public void setUsersDAO(UsersDAO usersDAO) {
		this.usersDAO = usersDAO;
	}
	
	public Users findUsers(String usersID){
		Users users = (Users)getUsersDAO().findById(usersID);
		return users;
	}
	
	public boolean checkLogin(String usersID,String password){
		Users users = findUsers(usersID);
		if(users != null && users.getUsersPassword().equals(password)){
			return true;
		}
		return false;
	}
}
